import tt
from openpyxl import load_workbook

index = 701

def doit():
    file = 'C:/Users/a330c/Desktop/voca.xlsx'
    wb = load_workbook(file)
    sheet = wb['Sheet1']
    for i in range(index, sheet.max_row + 1):
        index1 = 'A' + str(i)
        index2 = 'B' + str(i)
        val = sheet[index1].value
        if val != '':
            continue
        try:
            sheet[index2] = tt.get_mean2(val)
        except KeyError:
            pass
    wb.save(file)


if __name__ == '__main__':
    doit()




